<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: timers.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00887.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle">
<div class="title">timers.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03629_source.html">precomp.h</a>&quot;</code><br />
</div>
<p><a href="a00887_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a732b143181d546c5d531e27a138a70f3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a732b143181d546c5d531e27a138a70f3">_TIMERS</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a732b143181d546c5d531e27a138a70f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a241755ec1daa7ed448aa6e2a095161fa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a241755ec1daa7ed448aa6e2a095161fa">TIMERID_MAX</a>&#160;&#160;&#160;0x7FFF</td></tr>
<tr class="separator:a241755ec1daa7ed448aa6e2a095161fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8e26368f393c05f2e3c0041680493de"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#aa8e26368f393c05f2e3c0041680493de">TIMERID_MIN</a>&#160;&#160;&#160;0x100</td></tr>
<tr class="separator:aa8e26368f393c05f2e3c0041680493de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1be0fe3f7fb66e74f7844e0a584fd61f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a1be0fe3f7fb66e74f7844e0a584fd61f">ELLAPSED_MAX</a>&#160;&#160;&#160;0x7FFFFFFF</td></tr>
<tr class="separator:a1be0fe3f7fb66e74f7844e0a584fd61f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa95157297830f9de3a032c8ef668e1b5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#aa95157297830f9de3a032c8ef668e1b5">SYSRIT_TIMER</a>&#160;&#160;&#160;(TMRF_SYSTEM | TMRF_RIT)</td></tr>
<tr class="separator:aa95157297830f9de3a032c8ef668e1b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a61ef5d59165189082562ab59a7d0844e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a61ef5d59165189082562ab59a7d0844e">_SetTimer</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nIDEvent, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> dwElapse, <a class="el" href="a00365.html#aeb45e1c65bc6f45b9c278f43d805a86e">WNDPROC_PWND</a> pTimerFunc)</td></tr>
<tr class="separator:a61ef5d59165189082562ab59a7d0844e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23803d0eb05592a1e1ae26b60e68b420"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a23803d0eb05592a1e1ae26b60e68b420">_SetSystemTimer</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nIDEvent, <a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwElapse, <a class="el" href="a00365.html#aeb45e1c65bc6f45b9c278f43d805a86e">WNDPROC_PWND</a> pTimerFunc)</td></tr>
<tr class="separator:a23803d0eb05592a1e1ae26b60e68b420"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1d289f90c82165de5f743397f0e54e1"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#ad1d289f90c82165de5f743397f0e54e1">DestroyTimer</a> (<a class="el" href="a00899.html#a6fcf7de52483acef747d1eefa877ba5b">PTIMER</a> *pptmr)</td></tr>
<tr class="separator:ad1d289f90c82165de5f743397f0e54e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfa28055e0d30a4d41161b9a49f061e1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00899.html#a6fcf7de52483acef747d1eefa877ba5b">PTIMER</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#acfa28055e0d30a4d41161b9a49f061e1">FindTimer</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nID, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> flags, BOOL fKill)</td></tr>
<tr class="separator:acfa28055e0d30a4d41161b9a49f061e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb12a7f9838b4c0cf1572898103c6804"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#afb12a7f9838b4c0cf1572898103c6804">InternalSetTimer</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nIDEvent, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> dwElapse, <a class="el" href="a00365.html#aeb45e1c65bc6f45b9c278f43d805a86e">WNDPROC_PWND</a> pTimerFunc, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> flags)</td></tr>
<tr class="separator:afb12a7f9838b4c0cf1572898103c6804"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad372b283c181b3d4ea89cd67d08bebb6"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#ad372b283c181b3d4ea89cd67d08bebb6">_KillTimer</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nIDEvent)</td></tr>
<tr class="separator:ad372b283c181b3d4ea89cd67d08bebb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3b42fc45613df6ae1803075394c386a"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#ae3b42fc45613df6ae1803075394c386a">_KillSystemTimer</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nIDEvent)</td></tr>
<tr class="separator:ae3b42fc45613df6ae1803075394c386a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a115db005895d6765f34f419cba90b0ca"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a115db005895d6765f34f419cba90b0ca">KillTimer2</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> nIDEvent, BOOL fSystemTimer)</td></tr>
<tr class="separator:a115db005895d6765f34f419cba90b0ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b58253786e8e91044b7d02483c17c65"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a2b58253786e8e91044b7d02483c17c65">DestroyThreadsTimers</a> (<a class="el" href="a00365.html#a177dce23f2b497ba8dc22f5a92d3f3d3">PTHREADINFO</a> pti)</td></tr>
<tr class="separator:a2b58253786e8e91044b7d02483c17c65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d2eaf36d65645226b4503329fdfc12a"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a6d2eaf36d65645226b4503329fdfc12a">DestroyWindowsTimers</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd)</td></tr>
<tr class="separator:a6d2eaf36d65645226b4503329fdfc12a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04a824f3f9528ea16629393ebda2bd6a"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a04a824f3f9528ea16629393ebda2bd6a">DoTimer</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwndFilter, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wMsgFilterMin, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wMsgFilterMax)</td></tr>
<tr class="separator:a04a824f3f9528ea16629393ebda2bd6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87fb7b1a17373df639f0d6db692bdca0"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a87fb7b1a17373df639f0d6db692bdca0">DecTimerCount</a> (<a class="el" href="a00365.html#a177dce23f2b497ba8dc22f5a92d3f3d3">PTHREADINFO</a> pti)</td></tr>
<tr class="separator:a87fb7b1a17373df639f0d6db692bdca0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b4dcf77e866624a1d3dfb6e5e0b340b"><td class="memItemLeft" align="right" valign="top">LONG&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a6b4dcf77e866624a1d3dfb6e5e0b340b">JournalTimer</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> message, <a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> wParam, LONG lParam)</td></tr>
<tr class="separator:a6b4dcf77e866624a1d3dfb6e5e0b340b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29098a85ba39b7f172fc533c86ffd129"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#a29098a85ba39b7f172fc533c86ffd129">SetJournalTimer</a> (<a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dt, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> msgJournal)</td></tr>
<tr class="separator:a29098a85ba39b7f172fc533c86ffd129"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac49c5e325407f75a4ea05e7921bec14b"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#ac49c5e325407f75a4ea05e7921bec14b">StartTimers</a> (VOID)</td></tr>
<tr class="separator:ac49c5e325407f75a4ea05e7921bec14b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
变量</h2></td></tr>
<tr class="memitem:ad924b36b8aa0c81e31cc53a386d899f3"><td class="memItemLeft" align="right" valign="top">WORD&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00887.html#ad924b36b8aa0c81e31cc53a386d899f3">cTimerId</a> = <a class="el" href="a00887.html#a241755ec1daa7ed448aa6e2a095161fa">TIMERID_MAX</a></td></tr>
<tr class="separator:ad924b36b8aa0c81e31cc53a386d899f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">宏定义说明</h2>
<a id="a732b143181d546c5d531e27a138a70f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a732b143181d546c5d531e27a138a70f3">&#9670;&nbsp;</a></span>_TIMERS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define _TIMERS&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00013">13</a> 行定义.</p>

</div>
</div>
<a id="a1be0fe3f7fb66e74f7844e0a584fd61f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1be0fe3f7fb66e74f7844e0a584fd61f">&#9670;&nbsp;</a></span>ELLAPSED_MAX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ELLAPSED_MAX&#160;&#160;&#160;0x7FFFFFFF</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00030">30</a> 行定义.</p>

</div>
</div>
<a id="aa95157297830f9de3a032c8ef668e1b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa95157297830f9de3a032c8ef668e1b5">&#9670;&nbsp;</a></span>SYSRIT_TIMER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSRIT_TIMER&#160;&#160;&#160;(TMRF_SYSTEM | TMRF_RIT)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00032">32</a> 行定义.</p>

</div>
</div>
<a id="a241755ec1daa7ed448aa6e2a095161fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a241755ec1daa7ed448aa6e2a095161fa">&#9670;&nbsp;</a></span>TIMERID_MAX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TIMERID_MAX&#160;&#160;&#160;0x7FFF</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00027">27</a> 行定义.</p>

</div>
</div>
<a id="aa8e26368f393c05f2e3c0041680493de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8e26368f393c05f2e3c0041680493de">&#9670;&nbsp;</a></span>TIMERID_MIN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TIMERID_MIN&#160;&#160;&#160;0x100</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00028">28</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="ae3b42fc45613df6ae1803075394c386a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3b42fc45613df6ae1803075394c386a">&#9670;&nbsp;</a></span>_KillSystemTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _KillSystemTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nIDEvent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00408">408</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;{</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00887.html#a115db005895d6765f34f419cba90b0ca">KillTimer2</a>(pwnd, nIDEvent, TRUE);</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00424">KillTimer2()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00620_source.html#l00449">_SetCaretBlinkTime()</a>, <a class="el" href="a00620_source.html#l00486">_SetCaretPos()</a>, <a class="el" href="a03290_source.html#l02497">CancelMouseHover()</a>, <a class="el" href="a00620_source.html#l00190">InternalDestroyCaret()</a> , 以及 <a class="el" href="a00833_source.html#l01453">xxxEndScroll()</a>.</p>

</div>
</div>
<a id="ad372b283c181b3d4ea89cd67d08bebb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad372b283c181b3d4ea89cd67d08bebb6">&#9670;&nbsp;</a></span>_KillTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _KillTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nIDEvent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00391">391</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;{</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00887.html#a115db005895d6765f34f419cba90b0ca">KillTimer2</a>(pwnd, nIDEvent, FALSE);</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00424">KillTimer2()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l04150">NtUserKillTimer()</a>, <a class="el" href="a03590_source.html#l01313">xxxMNCloseHierarchy()</a>, <a class="el" href="a03590_source.html#l00160">xxxMNDestroyHandler()</a>, <a class="el" href="a03590_source.html#l00797">xxxMNOpenHierarchy()</a> , 以及 <a class="el" href="a03590_source.html#l01563">xxxMNSelectItem()</a>.</p>

</div>
</div>
<a id="a23803d0eb05592a1e1ae26b60e68b420"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23803d0eb05592a1e1ae26b60e68b420">&#9670;&nbsp;</a></span>_SetSystemTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> _SetSystemTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nIDEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>dwElapse</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#aeb45e1c65bc6f45b9c278f43d805a86e">WNDPROC_PWND</a>&#160;</td>
          <td class="paramname"><em>pTimerFunc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00078">78</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;{</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">     * Prevent apps from setting a Timer with a window proc to another app</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordflow">if</span> (pwnd &amp;&amp; PpiCurrent() != GETPTI(pwnd)-&gt;ppi) {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <a class="code" href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a>(ERROR_ACCESS_DENIED,</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                <span class="stringliteral">&quot;Calling SetSystemTimer with window of another process %lX&quot;</span>,</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                pwnd);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00887.html#afb12a7f9838b4c0cf1572898103c6804">InternalSetTimer</a>(pwnd, nIDEvent, dwElapse, pTimerFunc, TMRF_SYSTEM);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00213">InternalSetTimer()</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a> , 以及 <a class="el" href="a00371_source.html#l00120">RIPERR1</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00620_source.html#l00238">_CreateCaret()</a>, <a class="el" href="a00620_source.html#l00449">_SetCaretBlinkTime()</a>, <a class="el" href="a00620_source.html#l00486">_SetCaretPos()</a>, <a class="el" href="a03614_source.html#l06774">NtUserSetSystemTimer()</a>, <a class="el" href="a03290_source.html#l02457">ResetMouseHover()</a>, <a class="el" href="a00833_source.html#l01556">xxxContScroll()</a> , 以及 <a class="el" href="a00833_source.html#l01606">xxxTrackBox()</a>.</p>

</div>
</div>
<a id="a61ef5d59165189082562ab59a7d0844e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61ef5d59165189082562ab59a7d0844e">&#9670;&nbsp;</a></span>_SetTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> _SetTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nIDEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>dwElapse</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#aeb45e1c65bc6f45b9c278f43d805a86e">WNDPROC_PWND</a>&#160;</td>
          <td class="paramname"><em>pTimerFunc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00045">45</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;{</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment">     * Prevent apps from setting a Timer with a window proc to another app</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">if</span> (pwnd &amp;&amp; (PpiCurrent() != GETPTI(pwnd)-&gt;ppi)) {</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <a class="code" href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a>(ERROR_ACCESS_DENIED,</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;                <span class="stringliteral">&quot;Calling SetTimer with window of another process %lX&quot;</span>,</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;                pwnd);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    }</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00887.html#afb12a7f9838b4c0cf1572898103c6804">InternalSetTimer</a>(pwnd, nIDEvent, dwElapse, pTimerFunc, 0);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00213">InternalSetTimer()</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a> , 以及 <a class="el" href="a00371_source.html#l00120">RIPERR1</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03590_source.html#l02507">MNSetTimerToCloseHierarchy()</a>, <a class="el" href="a03590_source.html#l02468">MNSetTimerToOpenHierarchy()</a> , 以及 <a class="el" href="a03614_source.html#l04749">NtUserSetTimer()</a>.</p>

</div>
</div>
<a id="a87fb7b1a17373df639f0d6db692bdca0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87fb7b1a17373df639f0d6db692bdca0">&#9670;&nbsp;</a></span>DecTimerCount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID DecTimerCount </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a177dce23f2b497ba8dc22f5a92d3f3d3">PTHREADINFO</a>&#160;</td>
          <td class="paramname"><em>pti</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00615">615</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;{</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;    CheckCritIn();</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160; </div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;    <span class="keywordflow">if</span> (--pti-&gt;<a class="code" href="a02889.html#a8874a2fe20738a93e0fb9ebe374e08b7">cTimersReady</a> == 0)</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;        pti-&gt;<a class="code" href="a02889.html#a6f56a147ff76c3fc48c358f05adb0473">pcti</a>-&gt;<a class="code" href="a02649.html#a1fc053b04d0e037452d1efb7426bd89c">fsWakeBits</a> &amp;= ~QS_TIMER;</div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899_source.html#l02310">tagTHREADINFO::cTimersReady</a>, <a class="el" href="a00365_source.html#l02218">tagCLIENTTHREADINFO::fsWakeBits</a> , 以及 <a class="el" href="a00899_source.html#l02280">tagTHREADINFO::pcti</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00887_source.html#l00112">DestroyTimer()</a>, <a class="el" href="a00887_source.html#l00511">DoTimer()</a> , 以及 <a class="el" href="a00887_source.html#l00213">InternalSetTimer()</a>.</p>

</div>
</div>
<a id="a2b58253786e8e91044b7d02483c17c65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b58253786e8e91044b7d02483c17c65">&#9670;&nbsp;</a></span>DestroyThreadsTimers()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID DestroyThreadsTimers </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a177dce23f2b497ba8dc22f5a92d3f3d3">PTHREADINFO</a>&#160;</td>
          <td class="paramname"><em>pti</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00449">449</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;{</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;    <a class="code" href="a02981.html">PTIMER</a> *pptmr;</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160; </div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;    pptmr = &amp;<a class="code" href="a03257.html#a84bd5c4f22ef2020477acced03c9edac">gptmrFirst</a>;</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160; </div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    <span class="keywordflow">while</span> (*pptmr != NULL) {</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160; </div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;<span class="comment">         * Is this one of the timers we&#39;re looking for?  If so, destroy it.</span></div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;        <span class="keywordflow">if</span> ((*pptmr)-&gt;pti == pti || (*pptmr)-&gt;ptiOptCreator == pti) {</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;            <a class="code" href="a00887.html#ad1d289f90c82165de5f743397f0e54e1">DestroyTimer</a>(pptmr);</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;            pptmr = &amp;((*pptmr)-&gt;ptmrNext);</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;        }</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;    }</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00112">DestroyTimer()</a> , 以及 <a class="el" href="a03257_source.html#l00143">gptmrFirst</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00824_source.html#l01766">xxxDestroyThreadInfo()</a>.</p>

</div>
</div>
<a id="ad1d289f90c82165de5f743397f0e54e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1d289f90c82165de5f743397f0e54e1">&#9670;&nbsp;</a></span>DestroyTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID DestroyTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00899.html#a6fcf7de52483acef747d1eefa877ba5b">PTIMER</a> *&#160;</td>
          <td class="paramname"><em>pptmr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00112">112</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;{</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <a class="code" href="a02981.html">PTIMER</a> ptmr;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    CheckCritIn();</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    ptmr = *pptmr;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="comment">     * If this timer was just about to be processed, decrement</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="comment">     * the ready-count since we&#39;re blowing it off.</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordflow">if</span> (ptmr-&gt;<a class="code" href="a02981.html#ac8857c754110e179cc769f84373117ca">flags</a> &amp; TMRF_READY)</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        <a class="code" href="a00887.html#a87fb7b1a17373df639f0d6db692bdca0">DecTimerCount</a>(ptmr-&gt;<a class="code" href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">pti</a>);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="comment">     * Unlock the window</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    Unlock(&amp;ptmr-&gt;<a class="code" href="a02981.html#a68937d60a6f49b7a8431db62b38ea721">spwnd</a>);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="comment">     * Unlink this timer</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    *pptmr = ptmr-&gt;<a class="code" href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">ptmrNext</a>;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="comment">     * Free up the TIMER structure.</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    UserFreePool((PVOID)ptmr);</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00615">DecTimerCount()</a>, <a class="el" href="a00899_source.html#l02871">tagTIMER::flags</a>, <a class="el" href="a00899_source.html#l02866">tagTIMER::pti</a>, <a class="el" href="a00899_source.html#l02865">tagTIMER::ptmrNext</a> , 以及 <a class="el" href="a00899_source.html#l02867">tagTIMER::spwnd</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00887_source.html#l00449">DestroyThreadsTimers()</a>, <a class="el" href="a00887_source.html#l00479">DestroyWindowsTimers()</a> , 以及 <a class="el" href="a00887_source.html#l00155">FindTimer()</a>.</p>

</div>
</div>
<a id="a6d2eaf36d65645226b4503329fdfc12a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d2eaf36d65645226b4503329fdfc12a">&#9670;&nbsp;</a></span>DestroyWindowsTimers()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID DestroyWindowsTimers </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00479">479</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;{</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;    <a class="code" href="a02981.html">PTIMER</a> *pptmr;</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160; </div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    pptmr = &amp;<a class="code" href="a03257.html#a84bd5c4f22ef2020477acced03c9edac">gptmrFirst</a>;</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160; </div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    <span class="keywordflow">while</span> (*pptmr != NULL) {</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160; </div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;<span class="comment">         * Is this one of the timers we&#39;re looking for?  If so, destroy it.</span></div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;        <span class="keywordflow">if</span> ((*pptmr)-&gt;spwnd == pwnd) {</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;            <a class="code" href="a00887.html#ad1d289f90c82165de5f743397f0e54e1">DestroyTimer</a>(pptmr);</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;            pptmr = &amp;((*pptmr)-&gt;ptmrNext);</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;        }</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    }</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00112">DestroyTimer()</a> , 以及 <a class="el" href="a03257_source.html#l00143">gptmrFirst</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03236_source.html#l00361">xxxClientShutdown2()</a> , 以及 <a class="el" href="a00635_source.html#l01817">xxxFreeWindow()</a>.</p>

</div>
</div>
<a id="a04a824f3f9528ea16629393ebda2bd6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04a824f3f9528ea16629393ebda2bd6a">&#9670;&nbsp;</a></span>DoTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL DoTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwndFilter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wMsgFilterMin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wMsgFilterMax</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00511">511</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;{</div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;    <a class="code" href="a02889.html">PTHREADINFO</a> pti;</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;    <a class="code" href="a02981.html">PTIMER</a>      *pptmr;</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;    <a class="code" href="a02981.html">PTIMER</a>      ptmr;</div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    <a class="code" href="a02981.html">PTIMER</a>      ptmrNext;</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    <a class="code" href="a02857.html">PQMSG</a>       pqmsg;</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160; </div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;    CheckCritIn();</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160; </div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;    pti = <a class="code" href="a00257.html#a8315d2c807ba18ba9e528c40614b6173">PtiCurrent</a>();</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160; </div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;<span class="comment">     * Search for a timer that belongs to this queue.</span></div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;    pptmr = &amp;<a class="code" href="a03257.html#a84bd5c4f22ef2020477acced03c9edac">gptmrFirst</a>;</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160; </div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;    <span class="keywordflow">while</span> (*pptmr != NULL) {</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160; </div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        ptmr = *pptmr;</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160; </div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;<span class="comment">         * Has this timer gone off and is it one we&#39;re looking for?</span></div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;        <span class="keywordflow">if</span> ((ptmr-&gt;<a class="code" href="a02981.html#ac8857c754110e179cc769f84373117ca">flags</a> &amp; TMRF_READY) &amp;&amp;</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;            (ptmr-&gt;<a class="code" href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">pti</a> == pti)         &amp;&amp;</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;            <a class="code" href="a03641.html#ab30158d9de22f52e0dbe98db97b94e62">CheckPwndFilter</a>(ptmr-&gt;<a class="code" href="a02981.html#a68937d60a6f49b7a8431db62b38ea721">spwnd</a>, pwndFilter)) {</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160; </div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;<span class="comment">             * We found an appropriate timer. Put it in the app&#39;s queue and</span></div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;<span class="comment">             * return success.</span></div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;            <span class="keywordflow">if</span> ((pqmsg = <a class="code" href="a00824.html#a33338ab17ca4eb073cf36ecc1ae32435">AllocQEntry</a>(&amp;pti-&gt;<a class="code" href="a02889.html#a64e1dadbca00e671a6b925590f57e268">mlPost</a>)) != NULL) {</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160; </div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;<span class="comment">                 * Store the message and set the QS_POSTMESSAGE bit so the</span></div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;<span class="comment">                 * thread knows it has a message.</span></div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;                <a class="code" href="a00824.html#a40077ba7267f3c31f389f3eeac9c4506">StoreQMessage</a>(pqmsg,</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;                              ptmr-&gt;<a class="code" href="a02981.html#a68937d60a6f49b7a8431db62b38ea721">spwnd</a>,</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;                              (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)((ptmr-&gt;<a class="code" href="a02981.html#ac8857c754110e179cc769f84373117ca">flags</a> &amp; TMRF_SYSTEM) ?</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;                                      <a class="code" href="a00953.html#a6f8d160657d70c89baa1493d9425703f">WM_SYSTIMER</a> : WM_TIMER),</div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;                              (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>)ptmr-&gt;<a class="code" href="a02981.html#a5ef3abe55b29740015bc61b6ddd9a876">nID</a>,</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;                              (LONG)ptmr-&gt;<a class="code" href="a02981.html#a09afb45dd2a93c45335dd85f35579301">pfn</a>,</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;                              0,</div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;                              0);</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160; </div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;                <a class="code" href="a00824.html#a7a7fb081b27165c43974d89be67bbad8">SetWakeBit</a>(pti, QS_POSTMESSAGE | QS_ALLPOSTMESSAGE);</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;            }</div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160; </div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;<span class="comment">             * Reset this timer.</span></div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;            ptmr-&gt;<a class="code" href="a02981.html#ac8857c754110e179cc769f84373117ca">flags</a> &amp;= ~TMRF_READY;</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;            <a class="code" href="a00887.html#a87fb7b1a17373df639f0d6db692bdca0">DecTimerCount</a>(ptmr-&gt;<a class="code" href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">pti</a>);</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160; </div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;<span class="comment">             * If there are other timers in the system move this timer</span></div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;<span class="comment">             * to the end of the list so other timers in for this queue</span></div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;<span class="comment">             * get a chance to go off.</span></div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;            ptmrNext = ptmr-&gt;<a class="code" href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">ptmrNext</a>;</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;            <span class="keywordflow">if</span> (ptmrNext != NULL) {</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160; </div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;<span class="comment">                 * Remove ptmr from its place in the list.</span></div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;                *pptmr = ptmrNext;</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160; </div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;<span class="comment">                 * Move to the last TIMER of the list.</span></div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;                <span class="keywordflow">while</span> (ptmrNext-&gt;<a class="code" href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">ptmrNext</a> != NULL)</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;                    ptmrNext = ptmrNext-&gt;<a class="code" href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">ptmrNext</a>;</div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160; </div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;<span class="comment">                 * Insert this timer at the end.</span></div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;                ptmrNext-&gt;<a class="code" href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">ptmrNext</a> = ptmr;</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;                ptmr-&gt;<a class="code" href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">ptmrNext</a>     = NULL;</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;            }</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160; </div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;            <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;        }</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160; </div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;        pptmr = &amp;ptmr-&gt;<a class="code" href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">ptmrNext</a>;</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;    }</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160; </div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;    <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00824_source.html#l02258">AllocQEntry()</a>, <a class="el" href="a03641_source.html#l00100">CheckPwndFilter()</a>, <a class="el" href="a00887_source.html#l00615">DecTimerCount()</a>, <a class="el" href="a00563_source.html#l00175">DWORD</a>, <a class="el" href="a00899_source.html#l02871">tagTIMER::flags</a>, <a class="el" href="a03257_source.html#l00143">gptmrFirst</a>, <a class="el" href="a00899_source.html#l02276">tagTHREADINFO::mlPost</a>, <a class="el" href="a00899_source.html#l02868">tagTIMER::nID</a>, <a class="el" href="a00899_source.html#l02872">tagTIMER::pfn</a>, <a class="el" href="a00899_source.html#l02866">tagTIMER::pti</a>, <a class="el" href="a00263_source.html#l00526">PtiCurrent()</a>, <a class="el" href="a00899_source.html#l02865">tagTIMER::ptmrNext</a>, <a class="el" href="a00824_source.html#l03276">SetWakeBit()</a>, <a class="el" href="a00899_source.html#l02867">tagTIMER::spwnd</a>, <a class="el" href="a00824_source.html#l03502">StoreQMessage()</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a> , 以及 <a class="el" href="a00953_source.html#l01194">WM_SYSTIMER</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03290_source.html#l00220">xxxInternalGetMessage()</a>.</p>

</div>
</div>
<a id="acfa28055e0d30a4d41161b9a49f061e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfa28055e0d30a4d41161b9a49f061e1">&#9670;&nbsp;</a></span>FindTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00899.html#a6fcf7de52483acef747d1eefa877ba5b">PTIMER</a> FindTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fKill</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00155">155</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;{</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="a02981.html">PTIMER</a> *pptmr;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    pptmr = &amp;<a class="code" href="a03257.html#a84bd5c4f22ef2020477acced03c9edac">gptmrFirst</a>;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">while</span> (*pptmr != NULL) {</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160; </div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="comment">         * Is this the timer we&#39;re looking for?</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordflow">if</span> (((*pptmr)-&gt;spwnd == pwnd) &amp;&amp;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            ((*pptmr)-&gt;nID == nID)    &amp;&amp;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;            ((*pptmr)-&gt;flags &amp; <a class="code" href="a00887.html#aa95157297830f9de3a032c8ef668e1b5">SYSRIT_TIMER</a>) == (flags &amp; <a class="code" href="a00887.html#aa95157297830f9de3a032c8ef668e1b5">SYSRIT_TIMER</a>)) {</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="comment">             * Are we being called from KillTimer()? If so, destroy the</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="comment">             * timer.  return != 0 because *pptmr is gone.</span></div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;            <span class="keywordflow">if</span> (fKill) {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                <a class="code" href="a00887.html#ad1d289f90c82165de5f743397f0e54e1">DestroyTimer</a>(pptmr);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;                <span class="keywordflow">return</span> (<a class="code" href="a02981.html">PTIMER</a>)TRUE;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;            }</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="comment">             * Found the timer, break out of the loop.</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="comment">         * No, try the next one.</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        pptmr = &amp;((*pptmr)-&gt;ptmrNext);</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    }</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160; </div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keywordflow">return</span> *pptmr;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00112">DestroyTimer()</a>, <a class="el" href="a03257_source.html#l00143">gptmrFirst</a> , 以及 <a class="el" href="a00887_source.html#l00032">SYSRIT_TIMER</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00887_source.html#l00213">InternalSetTimer()</a> , 以及 <a class="el" href="a00887_source.html#l00424">KillTimer2()</a>.</p>

</div>
</div>
<a id="afb12a7f9838b4c0cf1572898103c6804"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb12a7f9838b4c0cf1572898103c6804">&#9670;&nbsp;</a></span>InternalSetTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> InternalSetTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nIDEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>dwElapse</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#aeb45e1c65bc6f45b9c278f43d805a86e">WNDPROC_PWND</a>&#160;</td>
          <td class="paramname"><em>pTimerFunc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00213">213</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;{</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    LARGE_INTEGER liT = {1, 0};</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <a class="code" href="a02981.html">PTIMER</a>        ptmr;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <a class="code" href="a02889.html">PTHREADINFO</a>   ptiCurrent;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160; </div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    CheckCritIn();</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160; </div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="comment">     * 1.0 compatibility weirdness. Also, don&#39;t allow negative elapse times</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="comment">     * because this&#39;ll cause ScanTimers() to generate negative elapse times</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="comment">     * between timers.</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    <span class="keywordflow">if</span> ((dwElapse == 0) || (dwElapse &gt; <a class="code" href="a00887.html#a1be0fe3f7fb66e74f7844e0a584fd61f">ELLAPSED_MAX</a>))</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        dwElapse = 1;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160; </div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<span class="comment">     * Attempt to first locate the timer, then create a new one</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;<span class="comment">     * if one isn&#39;t found.</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <span class="keywordflow">if</span> ((ptmr = <a class="code" href="a00887.html#acfa28055e0d30a4d41161b9a49f061e1">FindTimer</a>(pwnd, nIDEvent, flags, FALSE)) == NULL) {</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;<span class="comment">         * Not found.  Create a new one.</span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        ptmr = (<a class="code" href="a00899.html#a6fcf7de52483acef747d1eefa877ba5b">PTIMER</a>)UserAllocPoolWithQuota(<span class="keyword">sizeof</span>(<a class="code" href="a02981.html">TIMER</a>), TAG_TIMER);</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        <span class="keywordflow">if</span> (ptmr == NULL)</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;            <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160; </div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        ptmr-&gt;<a class="code" href="a02981.html#a68937d60a6f49b7a8431db62b38ea721">spwnd</a> = NULL;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="keywordflow">if</span> (pwnd == NULL) {</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160; </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;            WORD timerIdInitial = <a class="code" href="a00887.html#ad924b36b8aa0c81e31cc53a386d899f3">cTimerId</a>;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160; </div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;<span class="comment">             * Pick a unique, unused timer ID.</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                <span class="keywordflow">if</span> (--<a class="code" href="a00887.html#ad924b36b8aa0c81e31cc53a386d899f3">cTimerId</a> &lt;= <a class="code" href="a00887.html#aa8e26368f393c05f2e3c0041680493de">TIMERID_MIN</a>)</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                    <a class="code" href="a00887.html#ad924b36b8aa0c81e31cc53a386d899f3">cTimerId</a> = <a class="code" href="a00887.html#a241755ec1daa7ed448aa6e2a095161fa">TIMERID_MAX</a>;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160; </div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="a00887.html#ad924b36b8aa0c81e31cc53a386d899f3">cTimerId</a> == timerIdInitial) {</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160; </div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                    <span class="comment">/*</span></div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;<span class="comment">                     * Flat out of timers bud.</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="comment">                     */</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;                    UserFreePool(ptmr);</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;                    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                }</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160; </div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            } <span class="keywordflow">while</span> (<a class="code" href="a00887.html#acfa28055e0d30a4d41161b9a49f061e1">FindTimer</a>(NULL, <a class="code" href="a00887.html#ad924b36b8aa0c81e31cc53a386d899f3">cTimerId</a>, flags, FALSE) != NULL);</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;            ptmr-&gt;<a class="code" href="a02981.html#a5ef3abe55b29740015bc61b6ddd9a876">nID</a> = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)<a class="code" href="a00887.html#ad924b36b8aa0c81e31cc53a386d899f3">cTimerId</a>;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160; </div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;            ptmr-&gt;<a class="code" href="a02981.html#a5ef3abe55b29740015bc61b6ddd9a876">nID</a> = nIDEvent;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        }</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160; </div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;<span class="comment">         * Link the new timer into the front of the list.</span></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="comment">         * Handily this works even when gptmrFirst is NULL.</span></div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        ptmr-&gt;<a class="code" href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">ptmrNext</a> = <a class="code" href="a03257.html#a84bd5c4f22ef2020477acced03c9edac">gptmrFirst</a>;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <a class="code" href="a03257.html#a84bd5c4f22ef2020477acced03c9edac">gptmrFirst</a> = ptmr;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160; </div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;<span class="comment">         * If this timer was just about to be processed,</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<span class="comment">         * decrement cTimersReady since we&#39;re resetting it.</span></div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;        <span class="keywordflow">if</span> (ptmr-&gt;<a class="code" href="a02981.html#ac8857c754110e179cc769f84373117ca">flags</a> &amp; TMRF_READY)</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;            <a class="code" href="a00887.html#a87fb7b1a17373df639f0d6db692bdca0">DecTimerCount</a>(ptmr-&gt;<a class="code" href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">pti</a>);</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    }</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;<span class="comment">     * If pwnd is NULL, create a unique id by</span></div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;<span class="comment">     * using the timer handle.  RIT timers are &#39;owned&#39; by the RIT pti</span></div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="comment">     * so they are not deleted when the creating pti dies.</span></div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;<span class="comment">     *</span></div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="comment">     * We used to record the pti as the pti of the window if one was</span></div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="comment">     * specified.  This is not what Win 3.1 does and it broke 10862</span></div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;<span class="comment">     * where some merge app was setting the timer on winword&#39;s window</span></div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="comment">     * it it still expected to get the messages not winword.</span></div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="comment">     *</span></div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;<span class="comment">     * MS Visual C NT was counting on this bug in the NT 3.1 so if</span></div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;<span class="comment">     * a thread sets a timer for a window in another thread in the</span></div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="comment">     * same process the timer goes off in the thread of the window.</span></div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;<span class="comment">     * You can see this by doing a build in msvcnt and the files being</span></div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;<span class="comment">     * compiled do not show up.</span></div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160; </div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    ptiCurrent = (<a class="code" href="a00365.html#a177dce23f2b497ba8dc22f5a92d3f3d3">PTHREADINFO</a>)(W32GetCurrentThread()); <span class="comment">/*</span></div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;<span class="comment">                                                        * This will be NULL</span></div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;<span class="comment">                                                        * for a non-GUI thread.</span></div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;<span class="comment">                                                        */</span></div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160; </div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    <span class="keywordflow">if</span> (pwnd == NULL) {</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160; </div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <span class="keywordflow">if</span> (flags &amp; TMRF_RIT) {</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;            ptmr-&gt;<a class="code" href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">pti</a> = <a class="code" href="a03257.html#a15b01bf3bf02ba131160e26e97f4abf5">gptiRit</a>;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;            ptmr-&gt;<a class="code" href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">pti</a> = ptiCurrent;</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;            <a class="code" href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a>(ptiCurrent);</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;        }</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160; </div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;<span class="comment">         * As enforced in the API wrappers.  We shouldn&#39;t get here</span></div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;<span class="comment">         * any other way for an app timer.</span></div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        <span class="keywordflow">if</span> (ptiCurrent-&gt;<a class="code" href="a02889.html#ae8b869ec5b101646649020f5b0fd5d0d">TIF_flags</a> &amp; TIF_16BIT) {</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;            ptmr-&gt;<a class="code" href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">pti</a> = ptiCurrent;</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;            <a class="code" href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a>(ptiCurrent);</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;            ptmr-&gt;<a class="code" href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">pti</a> = GETPTI(pwnd);</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;        }</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    }</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160; </div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;<span class="comment">     * Initialize the timer-struct.</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="comment">     *</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="comment">     * NOTE: The ptiOptCreator is used to identify a JOURNAL-timer.  We</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;<span class="comment">     *       want to allow these timers to be destroyed when the creator</span></div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;<span class="comment">     *       thread goes away.  For other threads that create timers across</span></div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;<span class="comment">     *       threads, we do not want to destroy these timers when the</span></div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;<span class="comment">     *       creator goes away.  Currently, we&#39;re only checking for a</span></div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;<span class="comment">     *       TMRF_RIT.  However, in the future we might want to add this</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;<span class="comment">     *       same check for TMRF_SYSTEM.</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    Lock(&amp;(ptmr-&gt;<a class="code" href="a02981.html#a68937d60a6f49b7a8431db62b38ea721">spwnd</a>), pwnd);</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160; </div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    ptmr-&gt;<a class="code" href="a02981.html#a1502343e9cda13f2fa826d6478353531">cmsCountdown</a>  = ptmr-&gt;<a class="code" href="a02981.html#ad27586369f49b5532827d9149c8fbe98">cmsRate</a> = dwElapse;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    ptmr-&gt;<a class="code" href="a02981.html#ac8857c754110e179cc769f84373117ca">flags</a>         = flags | TMRF_INIT;</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;    ptmr-&gt;<a class="code" href="a02981.html#a09afb45dd2a93c45335dd85f35579301">pfn</a>           = pTimerFunc;</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;    ptmr-&gt;<a class="code" href="a02981.html#a831339ced27a6575fcd745aa8a32583b">ptiOptCreator</a> = (flags &amp; TMRF_RIT ? ptiCurrent : NULL);</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160; </div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;<span class="comment">     * Force the RIT to scan timers.</span></div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;<span class="comment">     *</span></div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;<span class="comment">     * N.B. The following code sets the raw input thread timer to expire</span></div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;<span class="comment">     *      at the absolute time 1 which is very far into the past. This</span></div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="comment">     *      causes the timer to immediately expire before the set timer</span></div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;<span class="comment">     *      call returns.</span></div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    <span class="keywordflow">if</span> (ptiCurrent == <a class="code" href="a03257.html#a15b01bf3bf02ba131160e26e97f4abf5">gptiRit</a>) {</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;<span class="comment">         * Don&#39;t let RIT timer loop reset the master timer - we already have.</span></div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;        <a class="code" href="a03257.html#a57a08ee268b6620451f005850d2479d9">gbMasterTimerSet</a> = TRUE;</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    }</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160; </div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <a class="code" href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a>(<a class="code" href="a03257.html#aef4224e2b5a39c2d4338e80c2057a7cc">gptmrMaster</a>);</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    KeSetTimer(<a class="code" href="a03257.html#aef4224e2b5a39c2d4338e80c2057a7cc">gptmrMaster</a>, liT, NULL);</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160; </div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;<span class="comment">     * Windows 3.1 returns the timer ID if non-zero, otherwise it returns 1.</span></div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="keywordflow">return</span> (ptmr-&gt;<a class="code" href="a02981.html#a5ef3abe55b29740015bc61b6ddd9a876">nID</a> == 0 ? 1 : ptmr-&gt;<a class="code" href="a02981.html#a5ef3abe55b29740015bc61b6ddd9a876">nID</a>);</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899_source.html#l02869">tagTIMER::cmsCountdown</a>, <a class="el" href="a00899_source.html#l02870">tagTIMER::cmsRate</a>, <a class="el" href="a00887_source.html#l00034">cTimerId</a>, <a class="el" href="a00887_source.html#l00615">DecTimerCount()</a>, <a class="el" href="a00887_source.html#l00030">ELLAPSED_MAX</a>, <a class="el" href="a00887_source.html#l00155">FindTimer()</a>, <a class="el" href="a00899_source.html#l02871">tagTIMER::flags</a>, <a class="el" href="a03257_source.html#l00142">gbMasterTimerSet</a>, <a class="el" href="a03257_source.html#l00132">gptiRit</a>, <a class="el" href="a03257_source.html#l00143">gptmrFirst</a>, <a class="el" href="a03257_source.html#l00155">gptmrMaster</a>, <a class="el" href="a00899_source.html#l02868">tagTIMER::nID</a>, <a class="el" href="a00899_source.html#l02872">tagTIMER::pfn</a>, <a class="el" href="a00899_source.html#l02866">tagTIMER::pti</a>, <a class="el" href="a00899_source.html#l02873">tagTIMER::ptiOptCreator</a>, <a class="el" href="a00899_source.html#l02865">tagTIMER::ptmrNext</a>, <a class="el" href="a00899_source.html#l02867">tagTIMER::spwnd</a>, <a class="el" href="a00899_source.html#l02294">tagTHREADINFO::TIF_flags</a>, <a class="el" href="a00887_source.html#l00027">TIMERID_MAX</a>, <a class="el" href="a00887_source.html#l00028">TIMERID_MIN</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a> , 以及 <a class="el" href="a00950_source.html#l00117">UserAssert</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00887_source.html#l00078">_SetSystemTimer()</a>, <a class="el" href="a00887_source.html#l00045">_SetTimer()</a>, <a class="el" href="a00599_source.html#l02424">_UserSoundSentryWorker()</a>, <a class="el" href="a00599_source.html#l01952">AccessTimeOutReset()</a>, <a class="el" href="a00638_source.html#l00395">AnimateCursor()</a>, <a class="el" href="a00599_source.html#l00471">FilterKeys()</a>, <a class="el" href="a00599_source.html#l00415">FKAcceptanceDelayTimer()</a>, <a class="el" href="a00599_source.html#l00233">FKActivationTimer()</a>, <a class="el" href="a00599_source.html#l00373">FKRepeatRateTimer()</a>, <a class="el" href="a00809_source.html#l01449">KeyboardApcProcedure()</a>, <a class="el" href="a00599_source.html#l01426">MKMouseMove()</a>, <a class="el" href="a00599_source.html#l01370">MKMoveAccelCursorTimer()</a>, <a class="el" href="a00887_source.html#l00664">SetJournalTimer()</a>, <a class="el" href="a00599_source.html#l02385">SoundSentryTimer()</a>, <a class="el" href="a00887_source.html#l00693">StartTimers()</a>, <a class="el" href="a00599_source.html#l01810">ToggleKeys()</a> , 以及 <a class="el" href="a00638_source.html#l00483">UpdateCursorImage()</a>.</p>

</div>
</div>
<a id="a6b4dcf77e866624a1d3dfb6e5e0b340b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b4dcf77e866624a1d3dfb6e5e0b340b">&#9670;&nbsp;</a></span>JournalTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LONG JournalTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>wParam</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LONG&#160;</td>
          <td class="paramname"><em>lParam</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00632">632</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;{</div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;    <a class="code" href="a02889.html">PTHREADINFO</a> pti;</div>
<div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160; </div>
<div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;    DBG_UNREFERENCED_PARAMETER(pwnd);</div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;    DBG_UNREFERENCED_PARAMETER(message);</div>
<div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;    DBG_UNREFERENCED_PARAMETER(lParam);</div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160; </div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;<span class="comment">     * We&#39;ve already entered the critical section.</span></div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;    <span class="keywordflow">if</span> (pti = ((<a class="code" href="a02981.html">PTIMER</a>)lParam)-&gt;ptiOptCreator)</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;        <a class="code" href="a03290.html#a0a3fd3f307e80195c7f13545ec5fbcff">WakeSomeone</a>(pti-&gt;<a class="code" href="a02889.html#aea8fcdf7513cfa8972ff27524296079b">pq</a>, pti-&gt;<a class="code" href="a02889.html#aea8fcdf7513cfa8972ff27524296079b">pq</a>-&gt;<a class="code" href="a02869.html#a25f1f53a4c7fe2696b42ab3a65a41564">msgJournal</a>, NULL);</div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160; </div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899_source.html#l02192">tagQ::msgJournal</a>, <a class="el" href="a00899_source.html#l02273">tagTHREADINFO::pq</a> , 以及 <a class="el" href="a03290_source.html#l01460">WakeSomeone()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00887_source.html#l00664">SetJournalTimer()</a>.</p>

</div>
</div>
<a id="a115db005895d6765f34f419cba90b0ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a115db005895d6765f34f419cba90b0ca">&#9670;&nbsp;</a></span>KillTimer2()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL KillTimer2 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>nIDEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fSystemTimer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00424">424</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;{</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;<span class="comment">     * Call FindTimer() with fKill == TRUE.  This will</span></div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;<span class="comment">     * basically delete the timer.</span></div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    <span class="keywordflow">return</span> (BOOL)<a class="code" href="a00887.html#acfa28055e0d30a4d41161b9a49f061e1">FindTimer</a>(pwnd,</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;                           nIDEvent,</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;                           (fSystemTimer ? TMRF_SYSTEM : 0),</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;                           TRUE);</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00155">FindTimer()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00887_source.html#l00408">_KillSystemTimer()</a> , 以及 <a class="el" href="a00887_source.html#l00391">_KillTimer()</a>.</p>

</div>
</div>
<a id="a29098a85ba39b7f172fc533c86ffd129"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29098a85ba39b7f172fc533c86ffd129">&#9670;&nbsp;</a></span>SetJournalTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SetJournalTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>dt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>msgJournal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00664">664</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;{</div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;    <span class="keyword">static</span> <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> idJournal = 0;</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160; </div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;    <a class="code" href="a00257.html#a8315d2c807ba18ba9e528c40614b6173">PtiCurrent</a>()-&gt;<a class="code" href="a02889.html#aea8fcdf7513cfa8972ff27524296079b">pq</a>-&gt;<a class="code" href="a02869.html#a25f1f53a4c7fe2696b42ab3a65a41564">msgJournal</a> = msgJournal;</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160; </div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;<span class="comment">     * Remember idJournal - because TMRF_ONESHOT timers stay in the timer</span></div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;<span class="comment">     * list - by remembering the idJournal, we always reuse the same timer</span></div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;<span class="comment">     * rather than creating new ones always.</span></div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;    idJournal = <a class="code" href="a00887.html#afb12a7f9838b4c0cf1572898103c6804">InternalSetTimer</a>(NULL,</div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;                                 idJournal,</div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;                                 dt,</div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;                                 <a class="code" href="a00887.html#a6b4dcf77e866624a1d3dfb6e5e0b340b">JournalTimer</a>,</div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;                                 TMRF_RIT | TMRF_ONESHOT);</div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00887_source.html#l00213">InternalSetTimer()</a>, <a class="el" href="a00887_source.html#l00632">JournalTimer()</a>, <a class="el" href="a00899_source.html#l02192">tagQ::msgJournal</a>, <a class="el" href="a00899_source.html#l02273">tagTHREADINFO::pq</a>, <a class="el" href="a00263_source.html#l00526">PtiCurrent()</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03290_source.html#l02684">xxxGetNextSysMsg()</a>.</p>

</div>
</div>
<a id="ac49c5e325407f75a4ea05e7921bec14b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac49c5e325407f75a4ea05e7921bec14b">&#9670;&nbsp;</a></span>StartTimers()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID StartTimers </td>
          <td>(</td>
          <td class="paramtype">VOID&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00693">693</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;{</div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;    <span class="keyword">extern</span> LONG <a class="code" href="a00707.html#a60df27edfd00873f54a2ee3d32aef7f4">HungAppDemon</a>(<a class="code" href="a02581.html">PWND</a> pwnd, <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> message, <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> wParam, LONG lParam);</div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160; </div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;<span class="comment">     * TMRF_RIT timers are called directly from ScanTimers -- no nasty</span></div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;<span class="comment">     * thread switching for these boys.</span></div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;    <a class="code" href="a00887.html#afb12a7f9838b4c0cf1572898103c6804">InternalSetTimer</a>(NULL, 0, 1000, <a class="code" href="a00707.html#a60df27edfd00873f54a2ee3d32aef7f4">HungAppDemon</a>, TMRF_RIT);</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00563_source.html#l00175">DWORD</a>, <a class="el" href="a00707_source.html#l00443">HungAppDemon()</a>, <a class="el" href="a00887_source.html#l00213">InternalSetTimer()</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00809_source.html#l01965">RawInputThread()</a>.</p>

</div>
</div>
<h2 class="groupheader">变量说明</h2>
<a id="ad924b36b8aa0c81e31cc53a386d899f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad924b36b8aa0c81e31cc53a386d899f3">&#9670;&nbsp;</a></span>cTimerId</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WORD cTimerId = <a class="el" href="a00887.html#a241755ec1daa7ed448aa6e2a095161fa">TIMERID_MAX</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00887_source.html">timers.c</a> 第 <a class="el" href="a00887_source.html#l00034">34</a> 行定义.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00887_source.html#l00213">InternalSetTimer()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa02649_html_a1fc053b04d0e037452d1efb7426bd89c"><div class="ttname"><a href="a02649.html#a1fc053b04d0e037452d1efb7426bd89c">tagCLIENTTHREADINFO::fsWakeBits</a></div><div class="ttdeci">WORD fsWakeBits</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02218">user.h:2218</a></div></div>
<div class="ttc" id="aa02889_html_ae8b869ec5b101646649020f5b0fd5d0d"><div class="ttname"><a href="a02889.html#ae8b869ec5b101646649020f5b0fd5d0d">tagTHREADINFO::TIF_flags</a></div><div class="ttdeci">DWORD TIF_flags</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02294">userk.h:2294</a></div></div>
<div class="ttc" id="aa00824_html_a7a7fb081b27165c43974d89be67bbad8"><div class="ttname"><a href="a00824.html#a7a7fb081b27165c43974d89be67bbad8">SetWakeBit</a></div><div class="ttdeci">VOID SetWakeBit(PTHREADINFO pti, UINT wWakeBit)</div><div class="ttdef"><b>Definition:</b> <a href="a00824_source.html#l03276">queue.c:3276</a></div></div>
<div class="ttc" id="aa00887_html_ad924b36b8aa0c81e31cc53a386d899f3"><div class="ttname"><a href="a00887.html#ad924b36b8aa0c81e31cc53a386d899f3">cTimerId</a></div><div class="ttdeci">WORD cTimerId</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00034">timers.c:34</a></div></div>
<div class="ttc" id="aa00887_html_a115db005895d6765f34f419cba90b0ca"><div class="ttname"><a href="a00887.html#a115db005895d6765f34f419cba90b0ca">KillTimer2</a></div><div class="ttdeci">BOOL KillTimer2(PWND pwnd, UINT nIDEvent, BOOL fSystemTimer)</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00424">timers.c:424</a></div></div>
<div class="ttc" id="aa02981_html_a831339ced27a6575fcd745aa8a32583b"><div class="ttname"><a href="a02981.html#a831339ced27a6575fcd745aa8a32583b">tagTIMER::ptiOptCreator</a></div><div class="ttdeci">PTHREADINFO ptiOptCreator</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02873">userk.h:2873</a></div></div>
<div class="ttc" id="aa03257_html_aef4224e2b5a39c2d4338e80c2057a7cc"><div class="ttname"><a href="a03257.html#aef4224e2b5a39c2d4338e80c2057a7cc">gptmrMaster</a></div><div class="ttdeci">PKTIMER gptmrMaster</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00155">kernel/globals.c:155</a></div></div>
<div class="ttc" id="aa00887_html_a1be0fe3f7fb66e74f7844e0a584fd61f"><div class="ttname"><a href="a00887.html#a1be0fe3f7fb66e74f7844e0a584fd61f">ELLAPSED_MAX</a></div><div class="ttdeci">#define ELLAPSED_MAX</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00030">timers.c:30</a></div></div>
<div class="ttc" id="aa03641_html_ab30158d9de22f52e0dbe98db97b94e62"><div class="ttname"><a href="a03641.html#ab30158d9de22f52e0dbe98db97b94e62">CheckPwndFilter</a></div><div class="ttdeci">BOOL CheckPwndFilter(PWND pwnd, PWND pwndFilter)</div><div class="ttdef"><b>Definition:</b> <a href="a03641_source.html#l00100">kernel/random.c:100</a></div></div>
<div class="ttc" id="aa02981_html_ad27586369f49b5532827d9149c8fbe98"><div class="ttname"><a href="a02981.html#ad27586369f49b5532827d9149c8fbe98">tagTIMER::cmsRate</a></div><div class="ttdeci">INT cmsRate</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02870">userk.h:2870</a></div></div>
<div class="ttc" id="aa00887_html_afb12a7f9838b4c0cf1572898103c6804"><div class="ttname"><a href="a00887.html#afb12a7f9838b4c0cf1572898103c6804">InternalSetTimer</a></div><div class="ttdeci">UINT InternalSetTimer(PWND pwnd, UINT nIDEvent, UINT dwElapse, WNDPROC_PWND pTimerFunc, UINT flags)</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00213">timers.c:213</a></div></div>
<div class="ttc" id="aa02869_html_a25f1f53a4c7fe2696b42ab3a65a41564"><div class="ttname"><a href="a02869.html#a25f1f53a4c7fe2696b42ab3a65a41564">tagQ::msgJournal</a></div><div class="ttdeci">UINT msgJournal</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02192">userk.h:2192</a></div></div>
<div class="ttc" id="aa00887_html_a87fb7b1a17373df639f0d6db692bdca0"><div class="ttname"><a href="a00887.html#a87fb7b1a17373df639f0d6db692bdca0">DecTimerCount</a></div><div class="ttdeci">VOID DecTimerCount(PTHREADINFO pti)</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00615">timers.c:615</a></div></div>
<div class="ttc" id="aa02981_html_a6b5e163b766b9dff9cbd7186d638c5cd"><div class="ttname"><a href="a02981.html#a6b5e163b766b9dff9cbd7186d638c5cd">tagTIMER::ptmrNext</a></div><div class="ttdeci">struct tagTIMER * ptmrNext</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02865">userk.h:2865</a></div></div>
<div class="ttc" id="aa00887_html_ad1d289f90c82165de5f743397f0e54e1"><div class="ttname"><a href="a00887.html#ad1d289f90c82165de5f743397f0e54e1">DestroyTimer</a></div><div class="ttdeci">VOID DestroyTimer(PTIMER *pptmr)</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00112">timers.c:112</a></div></div>
<div class="ttc" id="aa00371_html_a162a73e20dfabca084a3ebb4581631a8"><div class="ttname"><a href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a></div><div class="ttdeci">#define UserAssert(exp)</div><div class="ttdef"><b>Definition:</b> <a href="a00950_source.html#l00117">usersrv.h:117</a></div></div>
<div class="ttc" id="aa02981_html_a09afb45dd2a93c45335dd85f35579301"><div class="ttname"><a href="a02981.html#a09afb45dd2a93c45335dd85f35579301">tagTIMER::pfn</a></div><div class="ttdeci">WNDPROC_PWND pfn</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02872">userk.h:2872</a></div></div>
<div class="ttc" id="aa00257_html_a8315d2c807ba18ba9e528c40614b6173"><div class="ttname"><a href="a00257.html#a8315d2c807ba18ba9e528c40614b6173">PtiCurrent</a></div><div class="ttdeci">PTHREADINFO PtiCurrent(VOID)</div><div class="ttdef"><b>Definition:</b> <a href="a00263_source.html#l00526">winmgrc.c:526</a></div></div>
<div class="ttc" id="aa02981_html_a774eeae0f007ae3ea612baf38cd38936"><div class="ttname"><a href="a02981.html#a774eeae0f007ae3ea612baf38cd38936">tagTIMER::pti</a></div><div class="ttdeci">PTHREADINFO pti</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02866">userk.h:2866</a></div></div>
<div class="ttc" id="aa00707_html_a60df27edfd00873f54a2ee3d32aef7f4"><div class="ttname"><a href="a00707.html#a60df27edfd00873f54a2ee3d32aef7f4">HungAppDemon</a></div><div class="ttdeci">LONG HungAppDemon(PWND pwnd, UINT message, DWORD wParam, LONG lParam)</div><div class="ttdef"><b>Definition:</b> <a href="a00707_source.html#l00443">hungapp.c:443</a></div></div>
<div class="ttc" id="aa02981_html_a68937d60a6f49b7a8431db62b38ea721"><div class="ttname"><a href="a02981.html#a68937d60a6f49b7a8431db62b38ea721">tagTIMER::spwnd</a></div><div class="ttdeci">struct tagWND * spwnd</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02867">userk.h:2867</a></div></div>
<div class="ttc" id="aa03257_html_a15b01bf3bf02ba131160e26e97f4abf5"><div class="ttname"><a href="a03257.html#a15b01bf3bf02ba131160e26e97f4abf5">gptiRit</a></div><div class="ttdeci">PTHREADINFO gptiRit</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00132">kernel/globals.c:132</a></div></div>
<div class="ttc" id="aa00563_html_a074685e97e89d6aa2accdfcb82328699"><div class="ttname"><a href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a></div><div class="ttdeci">ddeml v[i&lt; inst &gt;][t&lt; type &gt;][hObj|pObj] Dump DDEML state information ddeml lists all ddeml instances for this process n ddeml t&lt; type &gt; lists all ddeml objects of the given type n n assumes link is first DWORD</div><div class="ttdef"><b>Definition:</b> <a href="a00563_source.html#l00175">exts.h:175</a></div></div>
<div class="ttc" id="aa02981_html_a5ef3abe55b29740015bc61b6ddd9a876"><div class="ttname"><a href="a02981.html#a5ef3abe55b29740015bc61b6ddd9a876">tagTIMER::nID</a></div><div class="ttdeci">UINT nID</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02868">userk.h:2868</a></div></div>
<div class="ttc" id="aa00953_html_a6f8d160657d70c89baa1493d9425703f"><div class="ttname"><a href="a00953.html#a6f8d160657d70c89baa1493d9425703f">WM_SYSTIMER</a></div><div class="ttdeci">#define WM_SYSTIMER</div><div class="ttdef"><b>Definition:</b> <a href="a00953_source.html#l01194">bench.c:1194</a></div></div>
<div class="ttc" id="aa02581_html"><div class="ttname"><a href="a02581.html">tagWND</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01388">user.h:1388</a></div></div>
<div class="ttc" id="aa02981_html"><div class="ttname"><a href="a02981.html">tagTIMER</a></div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02864">userk.h:2864</a></div></div>
<div class="ttc" id="aa00824_html_a33338ab17ca4eb073cf36ecc1ae32435"><div class="ttname"><a href="a00824.html#a33338ab17ca4eb073cf36ecc1ae32435">AllocQEntry</a></div><div class="ttdeci">PQMSG AllocQEntry(PMLIST pml)</div><div class="ttdef"><b>Definition:</b> <a href="a00824_source.html#l02258">queue.c:2258</a></div></div>
<div class="ttc" id="aa00371_html_a41f433389f20db57f042022a662e96de"><div class="ttname"><a href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a></div><div class="ttdeci">#define RIP_WARNING</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00029">winerrp.h:29</a></div></div>
<div class="ttc" id="aa03257_html_a57a08ee268b6620451f005850d2479d9"><div class="ttname"><a href="a03257.html#a57a08ee268b6620451f005850d2479d9">gbMasterTimerSet</a></div><div class="ttdeci">BOOL gbMasterTimerSet</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00142">kernel/globals.c:142</a></div></div>
<div class="ttc" id="aa00365_html_a177dce23f2b497ba8dc22f5a92d3f3d3"><div class="ttname"><a href="a00365.html#a177dce23f2b497ba8dc22f5a92d3f3d3">PTHREADINFO</a></div><div class="ttdeci">struct tagTHREADINFO * PTHREADINFO</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l00762">user.h:762</a></div></div>
<div class="ttc" id="aa00887_html_aa8e26368f393c05f2e3c0041680493de"><div class="ttname"><a href="a00887.html#aa8e26368f393c05f2e3c0041680493de">TIMERID_MIN</a></div><div class="ttdeci">#define TIMERID_MIN</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00028">timers.c:28</a></div></div>
<div class="ttc" id="aa03290_html_a0a3fd3f307e80195c7f13545ec5fbcff"><div class="ttname"><a href="a03290.html#a0a3fd3f307e80195c7f13545ec5fbcff">WakeSomeone</a></div><div class="ttdeci">void WakeSomeone(PQ pq, UINT message, PQMSG pqmsg)</div><div class="ttdef"><b>Definition:</b> <a href="a03290_source.html#l01460">kernel/input.c:1460</a></div></div>
<div class="ttc" id="aa02981_html_ac8857c754110e179cc769f84373117ca"><div class="ttname"><a href="a02981.html#ac8857c754110e179cc769f84373117ca">tagTIMER::flags</a></div><div class="ttdeci">UINT flags</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02871">userk.h:2871</a></div></div>
<div class="ttc" id="aa00887_html_a6b4dcf77e866624a1d3dfb6e5e0b340b"><div class="ttname"><a href="a00887.html#a6b4dcf77e866624a1d3dfb6e5e0b340b">JournalTimer</a></div><div class="ttdeci">LONG JournalTimer(PWND pwnd, UINT message, DWORD wParam, LONG lParam)</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00632">timers.c:632</a></div></div>
<div class="ttc" id="aa02889_html_aea8fcdf7513cfa8972ff27524296079b"><div class="ttname"><a href="a02889.html#aea8fcdf7513cfa8972ff27524296079b">tagTHREADINFO::pq</a></div><div class="ttdeci">struct tagQ * pq</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02273">userk.h:2273</a></div></div>
<div class="ttc" id="aa00899_html_a6fcf7de52483acef747d1eefa877ba5b"><div class="ttname"><a href="a00899.html#a6fcf7de52483acef747d1eefa877ba5b">PTIMER</a></div><div class="ttdeci">struct tagTIMER * PTIMER</div></div>
<div class="ttc" id="aa02889_html_a6f56a147ff76c3fc48c358f05adb0473"><div class="ttname"><a href="a02889.html#a6f56a147ff76c3fc48c358f05adb0473">tagTHREADINFO::pcti</a></div><div class="ttdeci">PCLIENTTHREADINFO pcti</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02280">userk.h:2280</a></div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa00371_html_adbdd8355d15a97b6f3a9e4766e6a2cc1"><div class="ttname"><a href="a00371.html#adbdd8355d15a97b6f3a9e4766e6a2cc1">RIPERR1</a></div><div class="ttdeci">#define RIPERR1(idErr, flags, szFmt, p1)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00120">winerrp.h:120</a></div></div>
<div class="ttc" id="aa02889_html"><div class="ttname"><a href="a02889.html">tagTHREADINFO</a></div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02260">userk.h:2260</a></div></div>
<div class="ttc" id="aa02889_html_a64e1dadbca00e671a6b925590f57e268"><div class="ttname"><a href="a02889.html#a64e1dadbca00e671a6b925590f57e268">tagTHREADINFO::mlPost</a></div><div class="ttdeci">MLIST mlPost</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02276">userk.h:2276</a></div></div>
<div class="ttc" id="aa00824_html_a40077ba7267f3c31f389f3eeac9c4506"><div class="ttname"><a href="a00824.html#a40077ba7267f3c31f389f3eeac9c4506">StoreQMessage</a></div><div class="ttdeci">void StoreQMessage(PQMSG pqmsg, PWND pwnd, UINT message, DWORD wParam, LONG lParam, DWORD dwQEvent, DWORD dwExtraInfo)</div><div class="ttdef"><b>Definition:</b> <a href="a00824_source.html#l03502">queue.c:3502</a></div></div>
<div class="ttc" id="aa00887_html_aa95157297830f9de3a032c8ef668e1b5"><div class="ttname"><a href="a00887.html#aa95157297830f9de3a032c8ef668e1b5">SYSRIT_TIMER</a></div><div class="ttdeci">#define SYSRIT_TIMER</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00032">timers.c:32</a></div></div>
<div class="ttc" id="aa00887_html_a241755ec1daa7ed448aa6e2a095161fa"><div class="ttname"><a href="a00887.html#a241755ec1daa7ed448aa6e2a095161fa">TIMERID_MAX</a></div><div class="ttdeci">#define TIMERID_MAX</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00027">timers.c:27</a></div></div>
<div class="ttc" id="aa02889_html_a8874a2fe20738a93e0fb9ebe374e08b7"><div class="ttname"><a href="a02889.html#a8874a2fe20738a93e0fb9ebe374e08b7">tagTHREADINFO::cTimersReady</a></div><div class="ttdeci">UINT cTimersReady</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02310">userk.h:2310</a></div></div>
<div class="ttc" id="aa02981_html_a1502343e9cda13f2fa826d6478353531"><div class="ttname"><a href="a02981.html#a1502343e9cda13f2fa826d6478353531">tagTIMER::cmsCountdown</a></div><div class="ttdeci">INT cmsCountdown</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02869">userk.h:2869</a></div></div>
<div class="ttc" id="aa03257_html_a84bd5c4f22ef2020477acced03c9edac"><div class="ttname"><a href="a03257.html#a84bd5c4f22ef2020477acced03c9edac">gptmrFirst</a></div><div class="ttdeci">PTIMER gptmrFirst</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00143">kernel/globals.c:143</a></div></div>
<div class="ttc" id="aa02857_html"><div class="ttname"><a href="a02857.html">tagQMSG</a></div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l02048">userk.h:2048</a></div></div>
<div class="ttc" id="aa00887_html_acfa28055e0d30a4d41161b9a49f061e1"><div class="ttname"><a href="a00887.html#acfa28055e0d30a4d41161b9a49f061e1">FindTimer</a></div><div class="ttdeci">PTIMER FindTimer(PWND pwnd, UINT nID, UINT flags, BOOL fKill)</div><div class="ttdef"><b>Definition:</b> <a href="a00887_source.html#l00155">timers.c:155</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_2a0a56546b70a0973705719e6a88eab3.html">kernel</a></li><li class="navelem"><a class="el" href="a00887.html">timers.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
